docs: update context-discipline for EGG_REAL_BACKEND_WINDOW injection [doc-updater] - #3348
Conversation
There was a problem hiding this comment.
No agent-mode design concerns. This is a documentation-only change updating the EGG_REAL_BACKEND_WINDOW env-var description to reflect always-injected behaviour at event spawn time (#3316); it touches no prompt construction, pre-fetching, output-format, post-processing, or model-identifier surfaces.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Approve. Doc-only change; every factual claim verified against the code at HEAD.
I treated this as an accuracy review (the diff makes specific claims about runtime behaviour) and traced each one to source:
- "the orchestrator always computes
real_backend_window(model)and exports the integer here via_ExecutorEventSpawner.spawn_event(#3316)" — confirmed._ExecutorEventSpawner.spawn_event(orchestrator/concurrent_executor.py:166, class at:142) setsenv["EGG_REAL_BACKEND_WINDOW"] = str(real_window)at:195, unconditionally — not gated behind a discipline/measurement flag — so "always injected" is accurate. The value comes from_build_event_spawn_params:659(real_window = real_backend_window(decision.claude_code_alias)), andreal_backend_window(model)exists atorchestrator/agent_model_resolution.py:468. The method/class name in the doc matches exactly. - "the measurement's orchestrator-import fallback is inert on the production event-pump path" — confirmed.
_resolve_real_window(shared/egg_agent/measurement.py:208) reads$EGG_REAL_BACKEND_WINDOWfirst (:229); thefrom orchestrator.agent_model_resolution import real_backend_windowfallback at:240always raises in-pod (orchestratoroffPYTHONPATH). - "In dev/CI … the measurement also imports the helper directly" — confirmed (
:239-247). - "Both window-relative metrics degrade to
Noneon pre-#3316 pods where the export is absent" — confirmed: with no override and no importable orchestrator, resolution returnsNone. - Parallel phrasing with
EGG_RESEED_THRESHOLD— the rewritten row and the new "Setting the flags in production" sentence are consistent with the existingEGG_RESEED_THRESHOLDrow (:234) and the #3284 paragraph. - Issue reference —
#3316exists, is CLOSED, and its title ("Inject EGG_REAL_BACKEND_WINDOW into agent event pods") matches the doc's description of its effect.
No inaccuracies, no stale/contradicting references elsewhere in the docs (checked docs/ for EGG_REAL_BACKEND_WINDOW / real_backend_window). The doc now correctly reflects post-#3316 behaviour. No blocking or non-blocking issues.
— Authored by egg
|
egg review completed. View run logs 1 previous review(s) hidden. |
docs: update context-discipline for EGG_REAL_BACKEND_WINDOW injection
Update
docs/architecture/context-discipline.mdto reflect thatEGG_REAL_BACKEND_WINDOWis now always injected by_ExecutorEventSpawner.spawn_eventat event spawn time, landing in #3316.EGG_REAL_BACKEND_WINDOWrow toexplicitly state the orchestrator always computes
real_backend_window(model)and exports it via
spawn_event(Inject EGG_REAL_BACKEND_WINDOW into agent event pods — #3249 window-utilization/working-set metrics are null without it #3316), matching the parallel phrasingused for
EGG_RESEED_THRESHOLD(feat(#3279): compute + inject EGG_RESEED_THRESHOLD per event spawn #3284). Clarifies that the orchestrator-import fallback is now inert on the production event-pump path and that
degradation to
Noneonly occurs on pre-Inject EGG_REAL_BACKEND_WINDOW into agent event pods — #3249 window-utilization/working-set metrics are null without it #3316 pods.EGG_REAL_BACKEND_WINDOWfollows the same always-injected pattern asEGG_RESEED_THRESHOLD, referencing Inject EGG_REAL_BACKEND_WINDOW into agent event pods — #3249 window-utilization/working-set metrics are null without it #3316.Triggered by: #3330
Issue: none
Test Plan
accurately describe the post-Inject EGG_REAL_BACKEND_WINDOW into agent event pods — #3249 window-utilization/working-set metrics are null without it #3316 injection behaviour.
Authored-by: egg